package com.hangjiang.gulidear.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * Meeting entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "meeting", catalog = "sqm")
public class Meeting extends BaseEntity {

	// Fields

	private String meetingId;
	private User user;
	private String meetingName;
	private Timestamp meetTime;
	private String attachPath;

	// Constructors

	/** default constructor */
	public Meeting() {
	}

	/** full constructor */
	public Meeting(User user, String meetingName, Timestamp meetTime,
			String attachPath) {
		this.user = user;
		this.meetingName = meetingName;
		this.meetTime = meetTime;
		this.attachPath = attachPath;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "meetingId", unique = true, nullable = false, length = 32)
	public String getMeetingId() {
		return this.meetingId;
	}

	public void setMeetingId(String meetingId) {
		this.meetingId = meetingId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userId")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "meetingName", length = 30)
	public String getMeetingName() {
		return this.meetingName;
	}

	public void setMeetingName(String meetingName) {
		this.meetingName = meetingName;
	}

	@Column(name = "meetTime", length = 0)
	public Timestamp getMeetTime() {
		return this.meetTime;
	}

	public void setMeetTime(Timestamp meetTime) {
		this.meetTime = meetTime;
	}

	@Column(name = "attachPath")
	public String getAttachPath() {
		return this.attachPath;
	}

	public void setAttachPath(String attachPath) {
		this.attachPath = attachPath;
	}

}